
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/************************************************ Generate Variables of Value-Based Practice ********************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/




* Set the global path and use the sample dataset from the specified path
global path ""
use "$path/Sample Data.dta", clear

* Set the panel data structure
xtset firm_id year




/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/*************************************Generation of Fixed-Value : Options/Stock/Equity **************************************************/
/***********************************Two consecutive years as in Shue and Townsend (2017,JF)**********************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/



* Generate a dummy variable: stock price change from year t-1 to year t is less than +/-3%
gen stk_prc_chg_in3percent = 0
replace stk_prc_chg_in3percent = 1 if prcc_f / prcc_f_b1 >= 0.97 & prcc_f / prcc_f_b1 <= 1.03

* Generate ratios for option, stock, and equity pay in two consecutive years
gen option_fv_ratio = option_fv / l.option_fv
gen stock_fv_ratio = stock_fv / l.stock_fv
gen equity_pay_ratio = equity_pay / l.equity_pay

gen option_fv_ratio2 = f.option_fv / option_fv
gen stock_fv_ratio2 = f.stock_fv / stock_fv
gen equity_pay_ratio2 = f.equity_pay / equity_pay

* Type 1: Fixed-Value Option Plans 
gen options_fv_fixed = 0
replace options_fv_fixed = 1 if (option_fv_ratio >= 0.97 & option_fv_ratio <= 1.03 & option_fv_ratio != . & option_fv_ratio != 0 & stk_prc_chg_in3percent != 1)
replace options_fv_fixed = 1 if (f.options_fv_fixed == 1 & stk_prc_chg_in3percent != 1)
replace options_fv_fixed = 1 if (option_fv_ratio2 >= 0.97 & option_fv_ratio2 <= 1.03 & option_fv_ratio2 != . & option_fv_ratio2 != 0 & year == 2022 & stk_prc_chg_in3percent != 1)
replace options_fv_fixed = . if option_fv_ratio == .

* Type 2: Fixed-Value Stock Plans 
gen stock_fv_fixed = 0
replace stock_fv_fixed = 1 if (stock_fv_ratio >= 0.97 & stock_fv_ratio <= 1.03 & stock_fv_ratio != . & stock_fv_ratio != 0 & stk_prc_chg_in3percent != 1)
replace stock_fv_fixed = 1 if (f.stock_fv_fixed == 1 & stk_prc_chg_in3percent != 1)
replace stock_fv_fixed = 1 if (stock_fv_ratio2 >= 0.97 & stock_fv_ratio2 <= 1.03 & stock_fv_ratio2 != . & stock_fv_ratio2 != 0 & year == 2022 & stk_prc_chg_in3percent != 1)
replace stock_fv_fixed = . if stock_fv_ratio == .

* Type 3: Fixed-Value Total Equity Plans 
gen equity_fixed = 0
replace equity_fixed = 1 if (equity_pay_ratio >= 0.97 & equity_pay_ratio <= 1.03 & equity_pay_ratio != . & equity_pay_ratio != 0 & stk_prc_chg_in3percent != 1)
replace equity_fixed = 1 if (f.equity_fixed == 1 & stk_prc_chg_in3percent != 1)
replace equity_fixed = 1 if (equity_pay_ratio2 >= 0.97 & equity_pay_ratio2 <= 1.03 & equity_pay_ratio2 != . & equity_pay_ratio2 != 0 & year == 2022 & stk_prc_chg_in3percent != 1)
replace equity_fixed = . if equity_pay_ratio == .

* Any Type of Fixed-Value Plans 
gen Fixed_Value = 0
replace Fixed_Value = 1 if options_fv_fixed == 1 | stock_fv_fixed == 1 | equity_fixed == 1
replace Fixed_Value = . if options_fv_fixed == . & stock_fv_fixed == . & equity_fixed == .



















/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/**************************************************Generation of Preset Structure********************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/




	
* Type 1: Regular Equity to Total Pay Ratio 

gen EquityTDC1_RglProportion = 0

* Generate ratios for equity pay and equity awards relative to TDC1
* equity pay is calculated as the sum of fair value of options pay and stock pay from the AnnualCompensation Dataset of Execucomp
* equity awards is calculated as the sum of fair value of options, restricted stock and performance units(target level) from the PlanBasedAwards Dataset of Execucomp
gen equity_TDC1_ratio = equity_pay / tdc1 
gen equity_awards_TDC1_ratio = equity_awards / tdc1

* Loop through values from 1 to 19 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues i = 1(1)19 {
    replace EquityTDC1_RglProportion = 1 if (equity_TDC1_ratio >= 0.995 * (0.05 * `i') & equity_TDC1_ratio <= 1.005 * (0.05 * `i'))
    replace EquityTDC1_RglProportion = 1 if (equity_awards_TDC1_ratio >= 0.995 * (0.05 * `i') & equity_awards_TDC1_ratio <= 1.005 * (0.05 * `i'))
}

* Loop through values from 1 to 2 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues j = 1(1)2 {
    replace EquityTDC1_RglProportion = 1 if (equity_TDC1_ratio >= 0.995 * (`j' / 3) & equity_TDC1_ratio <= 1.005 * (`j' / 3))
    replace EquityTDC1_RglProportion = 1 if (equity_awards_TDC1_ratio >= 0.995 * (`j' / 3) & equity_awards_TDC1_ratio <= 1.005 * (`j' / 3))
}

* Set missing value if both equity_pay and equity_awards are missing
replace EquityTDC1_RglProportion = . if equity_pay == . & equity_awards == .













* Type 2: Regular Stock or Option Pay Ratio 

gen EquityInside_RglProportion = 0

* 1. Identified based on AnnualCompensation Dataset

* Generate ratios for different combinations of option and stock fair values relative to equity pay
gen option_equity_fv_ratio = option_fv / equity_pay
gen stock_equity_fv_ratio = stock_fv / equity_pay
gen option_stock_fv_ratio = option_fv / stock_fv
gen stock_option_fv_ratio = stock_fv / option_fv

* Loop through values from 1 to 19 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues i = 1(1)19 {
    replace EquityInside_RglProportion = 1 if (option_equity_fv_ratio >= 0.995 * (0.05 * `i') & option_equity_fv_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (stock_equity_fv_ratio >= 0.995 * (0.05 * `i') & stock_equity_fv_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (stock_option_fv_ratio >= 0.995 * (0.05 * `i') & stock_option_fv_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_stock_fv_ratio >= 0.995 * (0.05 * `i') & option_stock_fv_ratio <= 1.005 * (0.05 * `i'))
}

* Loop through values from 1 to 2 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues j = 1(1)2 {
    replace EquityInside_RglProportion = 1 if (stock_option_fv_ratio >= 0.995 * (`j' / 3) & stock_option_fv_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_stock_fv_ratio >= 0.995 * (`j' / 3) & option_stock_fv_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_equity_fv_ratio >= 0.995 * (`j' / 3) & option_equity_fv_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (stock_equity_fv_ratio >= 0.995 * (`j' / 3) & stock_equity_fv_ratio <= 1.005 * (`j' / 3))
}


* 2. Identified based on PlanBasedAwards Dataset

* Generate various ratios for different combinations of option and stock (restricted stock and performance unit) total value
* options_fv_ttl: total fair value of option grants
* restrictedstk_fv_ttl: total fair value of restricted stock grants
* performance_units_fv_ttl: total fair value of performance units grants (target level)
gen option_rst_ratio1 = options_fv_ttl / restrictedstk_fv_ttl
gen option_rst_ratio2 = options_fv_ttl / (restrictedstk_fv_ttl + options_fv_ttl)
gen option_psu_ratio1 = options_fv_ttl / performance_units_fv_ttl
gen option_psu_ratio2 = options_fv_ttl / (performance_units_fv_ttl + options_fv_ttl)
gen option_psu_rst_ratio = options_fv_ttl / (restrictedstk_fv_ttl + performance_units_fv_ttl)
gen option_equity_ratio = options_fv_ttl / (restrictedstk_fv_ttl + performance_units_fv_ttl + options_fv_ttl)
gen rst_option_ratio1 = restrictedstk_fv_ttl / options_fv_ttl
gen rst_option_ratio2 = restrictedstk_fv_ttl / (options_fv_ttl + restrictedstk_fv_ttl)
gen rst_psu_options_ratio = restrictedstk_fv_ttl / (options_fv_ttl + performance_units_fv_ttl)
gen rst_equity_ratio = restrictedstk_fv_ttl / (restrictedstk_fv_ttl + performance_units_fv_ttl + options_fv_ttl)
gen psu_options_ratio1 = performance_units_fv_ttl / options_fv_ttl
gen psu_options_ratio2 = performance_units_fv_ttl / (options_fv_ttl + performance_units_fv_ttl)
gen psu_rst_options_ratio = performance_units_fv_ttl / (options_fv_ttl + restrictedstk_fv_ttl)
gen psu_equity_ratio = performance_units_fv_ttl / (restrictedstk_fv_ttl + performance_units_fv_ttl + options_fv_ttl)
gen option_psu_rst_ratio_r = (restrictedstk_fv_ttl + performance_units_fv_ttl) / options_fv_ttl
gen rst_psu_options_ratio_r = (options_fv_ttl + performance_units_fv_ttl) / restrictedstk_fv_ttl
gen psu_rst_options_ratio_r = (options_fv_ttl + restrictedstk_fv_ttl) / performance_units_fv_ttl

* Loop through values from 1 to 19 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues i = 1(1)19 {
    replace EquityInside_RglProportion = 1 if (option_rst_ratio1 >= 0.995 * (0.05 * `i') & option_rst_ratio1 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_rst_ratio2 >= 0.995 * (0.05 * `i') & option_rst_ratio2 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio1 >= 0.995 * (0.05 * `i') & option_psu_ratio1 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio2 >= 0.995 * (0.05 * `i') & option_psu_ratio2 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratio >= 0.995 * (0.05 * `i') & option_psu_rst_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_equity_ratio >= 0.995 * (0.05 * `i') & option_equity_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio1 >= 0.995 * (0.05 * `i') & rst_option_ratio1 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio2 >= 0.995 * (0.05 * `i') & rst_option_ratio2 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratio >= 0.995 * (0.05 * `i') & rst_psu_options_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_equity_ratio >= 0.995 * (0.05 * `i') & rst_equity_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio1 >= 0.995 * (0.05 * `i') & psu_options_ratio1 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio2 >= 0.995 * (0.05 * `i') & psu_options_ratio2 <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratio >= 0.995 * (0.05 * `i') & psu_rst_options_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_equity_ratio >= 0.995 * (0.05 * `i') & psu_equity_ratio <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratio_r >= 0.995 * (0.05 * `i') & option_psu_rst_ratio_r <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratio_r >= 0.995 * (0.05 * `i') & rst_psu_options_ratio_r <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratio_r >= 0.995 * (0.05 * `i') & psu_rst_options_ratio_r <= 1.005 * (0.05 * `i'))
}

* Loop through values from 1 to 2 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues j = 1(1)2 {
    replace EquityInside_RglProportion = 1 if (option_rst_ratio1 >= 0.995 * (`j' / 3) & option_rst_ratio1 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_rst_ratio2 >= 0.995 * (`j' / 3) & option_rst_ratio2 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio1 >= 0.995 * (`j' / 3) & option_psu_ratio1 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio2 >= 0.995 * (`j' / 3) & option_psu_ratio2 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratio >= 0.995 * (`j' / 3) & option_psu_rst_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_equity_ratio >= 0.995 * (`j' / 3) & option_equity_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio1 >= 0.995 * (`j' / 3) & rst_option_ratio1 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio2 >= 0.995 * (`j' / 3) & rst_option_ratio2 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratio >= 0.995 * (`j' / 3) & rst_psu_options_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_equity_ratio >= 0.995 * (`j' / 3) & rst_equity_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio1 >= 0.995 * (`j' / 3) & psu_options_ratio1 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio2 >= 0.995 * (`j' / 3) & psu_options_ratio2 <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratio >= 0.995 * (`j' / 3) & psu_rst_options_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_equity_ratio >= 0.995 * (`j' / 3) & psu_equity_ratio <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratio_r >= 0.995 * (`j' / 3) & option_psu_rst_ratio_r <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratio_r >= 0.995 * (`j' / 3) & rst_psu_options_ratio_r <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratio_r >= 0.995 * (`j' / 3) & psu_rst_options_ratio_r <= 1.005 * (`j' / 3))
}


* Generate various ratios for different combinations of option and stock (restricted stock and performance unit) maximum value
* options_fv_max: maximum value of option grants if there were not only one grant during the fiscal year
* restrictedstk_fv_max: maximum value of restricted stock grants if there were not only one grant during the fiscal year
* performance_units_fv_max: maximum value of performance units grants (target level) if there were not only one grant during the fiscal year
gen option_rst_ratio1m = options_fv_max / restrictedstk_fv_max
gen option_rst_ratio2m = options_fv_max / (restrictedstk_fv_max + options_fv_max)
gen option_psu_ratio1m = options_fv_max / performance_units_fv_max
gen option_psu_ratio2m = options_fv_max / (performance_units_fv_max + options_fv_max)
gen option_psu_rst_ratiom = options_fv_max / (restrictedstk_fv_max + performance_units_fv_max)
gen option_equity_ratiom = options_fv_max / (restrictedstk_fv_max + performance_units_fv_max + options_fv_max)
gen rst_option_ratio1m = restrictedstk_fv_max / options_fv_max
gen rst_option_ratio2m = restrictedstk_fv_max / (options_fv_max + restrictedstk_fv_max)
gen rst_psu_options_ratiom = restrictedstk_fv_max / (options_fv_max + performance_units_fv_max)
gen rst_equity_ratiom = restrictedstk_fv_max / (restrictedstk_fv_max + performance_units_fv_max + options_fv_max)
gen psu_options_ratio1m = performance_units_fv_max / options_fv_max
gen psu_options_ratio2m = performance_units_fv_max / (options_fv_max + performance_units_fv_max)
gen psu_rst_options_ratiom = performance_units_fv_max / (options_fv_max + restrictedstk_fv_max)
gen psu_equity_ratiom = performance_units_fv_max / (restrictedstk_fv_max + performance_units_fv_max + options_fv_max)
gen option_psu_rst_ratiom_r = (restrictedstk_fv_max + performance_units_fv_max) / options_fv_max
gen rst_psu_options_ratiom_r = (options_fv_max + performance_units_fv_max) / restrictedstk_fv_max
gen psu_rst_options_ratiom_r = (options_fv_max + restrictedstk_fv_max) / performance_units_fv_max

* Loop through values from 1 to 19 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues i = 1(1)19 {
    replace EquityInside_RglProportion = 1 if (option_rst_ratio1m >= 0.995 * (0.05 * `i') & option_rst_ratio1m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_rst_ratio2m >= 0.995 * (0.05 * `i') & option_rst_ratio2m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio1m >= 0.995 * (0.05 * `i') & option_psu_ratio1m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio2m >= 0.995 * (0.05 * `i') & option_psu_ratio2m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratiom >= 0.995 * (0.05 * `i') & option_psu_rst_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_equity_ratiom >= 0.995 * (0.05 * `i') & option_equity_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio1m >= 0.995 * (0.05 * `i') & rst_option_ratio1m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio2m >= 0.995 * (0.05 * `i') & rst_option_ratio2m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratiom >= 0.995 * (0.05 * `i') & rst_psu_options_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_equity_ratiom >= 0.995 * (0.05 * `i') & rst_equity_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio1m >= 0.995 * (0.05 * `i') & psu_options_ratio1m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio2m >= 0.995 * (0.05 * `i') & psu_options_ratio2m <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratiom >= 0.995 * (0.05 * `i') & psu_rst_options_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_equity_ratiom >= 0.995 * (0.05 * `i') & psu_equity_ratiom <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratiom_r >= 0.995 * (0.05 * `i') & option_psu_rst_ratiom_r <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratiom_r >= 0.995 * (0.05 * `i') & rst_psu_options_ratiom_r <= 1.005 * (0.05 * `i'))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratiom_r >= 0.995 * (0.05 * `i') & psu_rst_options_ratiom_r <= 1.005 * (0.05 * `i'))
}

* Loop through values from 1 to 2 to check if the ratios fall within the specified range
* Allow a 0.5% rounding error
forvalues j = 1(1)2 {
    replace EquityInside_RglProportion = 1 if (option_rst_ratio1m >= 0.995 * (`j' / 3) & option_rst_ratio1m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_rst_ratio2m >= 0.995 * (`j' / 3) & option_rst_ratio2m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio1m >= 0.995 * (`j' / 3) & option_psu_ratio1m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_ratio2m >= 0.995 * (`j' / 3) & option_psu_ratio2m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratiom >= 0.995 * (`j' / 3) & option_psu_rst_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_equity_ratiom >= 0.995 * (`j' / 3) & option_equity_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio1m >= 0.995 * (`j' / 3) & rst_option_ratio1m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_option_ratio2m >= 0.995 * (`j' / 3) & rst_option_ratio2m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratiom >= 0.995 * (`j' / 3) & rst_psu_options_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_equity_ratiom >= 0.995 * (`j' / 3) & rst_equity_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio1m >= 0.995 * (`j' / 3) & psu_options_ratio1m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_options_ratio2m >= 0.995 * (`j' / 3) & psu_options_ratio2m <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratiom >= 0.995 * (`j' / 3) & psu_rst_options_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_equity_ratiom >= 0.995 * (`j' / 3) & psu_equity_ratiom <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (option_psu_rst_ratiom_r >= 0.995 * (`j' / 3) & option_psu_rst_ratiom_r <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (rst_psu_options_ratiom_r >= 0.995 * (`j' / 3) & rst_psu_options_ratiom_r <= 1.005 * (`j' / 3))
    replace EquityInside_RglProportion = 1 if (psu_rst_options_ratiom_r >= 0.995 * (`j' / 3) & psu_rst_options_ratiom_r <= 1.005 * (`j' / 3))
}

* Set missing value if equity_pay are missing
replace EquityInside_RglProportion = . if equity_pay == .

	
	
	
	

	
	
	
* Type 3: Fixed Pay Ratio	

* Identified based on change of Equity Pay Ratio 
gen equity_TDC1_ratio_chg = equity_TDC1_ratio / l.equity_TDC1_ratio
gen equity_awards_TDC1_ratio_chg = equity_awards_TDC1_ratio / l.equity_awards_TDC1_ratio

gen EquityTDC1_UnchgProportion = 0
replace EquityTDC1_UnchgProportion = 1 if equity_TDC1_ratio_chg >= 0.97 & equity_TDC1_ratio_chg <= 1.03 & equity_TDC1_ratio_chg ~= . & stk_prc_chg_in3percent ~= 1
replace EquityTDC1_UnchgProportion = 1 if equity_awards_TDC1_ratio_chg >= 0.97 & equity_awards_TDC1_ratio_chg <= 1.03 & equity_awards_TDC1_ratio_chg ~= . & stk_prc_chg_in3percent ~= 1
replace EquityTDC1_UnchgProportion = . if equity_TDC1_ratio_chg == . & equity_awards_TDC1_ratio_chg == .

* Identified based on change of Stock/Option Pay Ratio 
gen option_equity_fv_ratio_chg = option_equity_fv_ratio / l.option_equity_fv_ratio
gen stock_equity_fv_ratio_chg = stock_equity_fv_ratio / l.stock_equity_fv_ratio
gen option_stock_fv_ratio_chg = option_stock_fv_ratio / l.option_stock_fv_ratio
gen stock_option_fv_ratio_chg = stock_option_fv_ratio / l.stock_option_fv_ratio

gen option_rst_ratio1_chg = option_rst_ratio1 / l.option_rst_ratio1
gen option_rst_ratio2_chg = option_rst_ratio2 / l.option_rst_ratio2
gen option_psu_ratio1_chg = option_psu_ratio1 / l.option_psu_ratio1
gen option_psu_ratio2_chg = option_psu_ratio2 / l.option_psu_ratio2
gen option_psu_rst_ratio_chg = option_psu_rst_ratio / l.option_psu_rst_ratio
gen option_equity_ratio_chg = option_equity_ratio / l.option_equity_ratio
gen rst_option_ratio1_chg = rst_option_ratio1 / l.rst_option_ratio1
gen rst_option_ratio2_chg = rst_option_ratio2 / l.rst_option_ratio2
gen rst_psu_options_ratio_chg = rst_psu_options_ratio / l.rst_psu_options_ratio
gen rst_equity_ratio_chg = rst_equity_ratio / l.rst_equity_ratio
gen psu_options_ratio1_chg = psu_options_ratio1 / l.psu_options_ratio1
gen psu_options_ratio2_chg = psu_options_ratio2 / l.psu_options_ratio2
gen psu_rst_options_ratio_chg = psu_rst_options_ratio / l.psu_rst_options_ratio
gen psu_equity_ratio_chg = psu_equity_ratio / l.psu_equity_ratio
gen option_psu_rst_ratio_r_chg = option_psu_rst_ratio_r / l.option_psu_rst_ratio_r
gen rst_psu_options_ratio_r_chg = rst_psu_options_ratio_r / l.rst_psu_options_ratio_r
gen psu_rst_options_ratio_r_chg = psu_rst_options_ratio_r / l.psu_rst_options_ratio_r

gen option_rst_ratio1m_chg = option_rst_ratio1m / l.option_rst_ratio1m
gen option_rst_ratio2m_chg = option_rst_ratio2m / l.option_rst_ratio2m
gen option_psu_ratio1m_chg = option_psu_ratio1m / l.option_psu_ratio1m
gen option_psu_ratio2m_chg = option_psu_ratio2m / l.option_psu_ratio2m
gen option_psu_rst_ratiom_chg = option_psu_rst_ratiom / l.option_psu_rst_ratiom
gen option_equity_ratiom_chg = option_equity_ratiom / l.option_equity_ratiom
gen rst_option_ratio1m_chg = rst_option_ratio1m / l.rst_option_ratio1m
gen rst_option_ratio2m_chg = rst_option_ratio2m / l.rst_option_ratio2m
gen rst_psu_options_ratiom_chg = rst_psu_options_ratiom / l.rst_psu_options_ratiom
gen rst_equity_ratiom_chg = rst_equity_ratiom / l.rst_equity_ratiom
gen psu_options_ratio1m_chg = psu_options_ratio1m / l.psu_options_ratio1m
gen psu_options_ratio2m_chg = psu_options_ratio2m / l.psu_options_ratio2m
gen psu_rst_options_ratiom_chg = psu_rst_options_ratiom / l.psu_rst_options_ratiom
gen psu_equity_ratiom_chg = psu_equity_ratiom / l.psu_equity_ratiom
gen option_psu_rst_ratiom_r_chg = option_psu_rst_ratiom_r / l.option_psu_rst_ratiom_r
gen rst_psu_options_ratiom_r_chg = rst_psu_options_ratiom_r / l.rst_psu_options_ratiom_r
gen psu_rst_options_ratiom_r_chg = psu_rst_options_ratiom_r / l.psu_rst_options_ratiom_r

gen EquityInside_UnchgProportion = 0
replace EquityInside_UnchgProportion = 1 if (option_equity_fv_ratio_chg >= 0.97 & option_equity_fv_ratio_chg <= 1.03 & option_equity_fv_ratio_chg != . & option_fv != 0 & stock_fv != 0 & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (stock_equity_fv_ratio_chg >= 0.97 & stock_equity_fv_ratio_chg <= 1.03 & stock_equity_fv_ratio_chg != . & option_fv != 0 & stock_fv != 0 & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_stock_fv_ratio_chg >= 0.97 & option_stock_fv_ratio_chg <= 1.03 & option_stock_fv_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (stock_option_fv_ratio_chg >= 0.97 & stock_option_fv_ratio_chg <= 1.03 & stock_option_fv_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_rst_ratio1_chg >= 0.97 & option_rst_ratio1_chg <= 1.03 & option_rst_ratio1_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_rst_ratio2_chg >= 0.97 & option_rst_ratio2_chg <= 1.03 & option_rst_ratio2_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_ratio1_chg >= 0.97 & option_psu_ratio1_chg <= 1.03 & option_psu_ratio1_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_ratio2_chg >= 0.97 & option_psu_ratio2_chg <= 1.03 & option_psu_ratio2_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_rst_ratio_chg >= 0.97 & option_psu_rst_ratio_chg <= 1.03 & option_psu_rst_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_equity_ratio_chg >= 0.97 & option_equity_ratio_chg <= 1.03 & option_equity_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_option_ratio1_chg >= 0.97 & rst_option_ratio1_chg <= 1.03 & rst_option_ratio1_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_option_ratio2_chg >= 0.97 & rst_option_ratio2_chg <= 1.03 & rst_option_ratio2_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_psu_options_ratio_chg >= 0.97 & rst_psu_options_ratio_chg <= 1.03 & rst_psu_options_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_equity_ratio_chg >= 0.97 & rst_equity_ratio_chg <= 1.03 & rst_equity_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_options_ratio1_chg >= 0.97 & psu_options_ratio1_chg <= 1.03 & psu_options_ratio1_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_options_ratio2_chg >= 0.97 & psu_options_ratio2_chg <= 1.03 & psu_options_ratio2_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_rst_options_ratio_chg >= 0.97 & psu_rst_options_ratio_chg <= 1.03 & psu_rst_options_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_equity_ratio_chg >= 0.97 & psu_equity_ratio_chg <= 1.03 & psu_equity_ratio_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_rst_ratio_r_chg >= 0.97 & option_psu_rst_ratio_r_chg <= 1.03 & option_psu_rst_ratio_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_psu_options_ratio_r_chg >= 0.97 & rst_psu_options_ratio_r_chg <= 1.03 & rst_psu_options_ratio_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_rst_options_ratio_r_chg >= 0.97 & psu_rst_options_ratio_r_chg <= 1.03 & psu_rst_options_ratio_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_rst_ratio1m_chg >= 0.97 & option_rst_ratio1m_chg <= 1.03 & option_rst_ratio1m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_rst_ratio2m_chg >= 0.97 & option_rst_ratio2m_chg <= 1.03 & option_rst_ratio2m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_ratio1m_chg >= 0.97 & option_psu_ratio1m_chg <= 1.03 & option_psu_ratio1m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_ratio2m_chg >= 0.97 & option_psu_ratio2m_chg <= 1.03 & option_psu_ratio2m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_rst_ratiom_chg >= 0.97 & option_psu_rst_ratiom_chg <= 1.03 & option_psu_rst_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_equity_ratiom_chg >= 0.97 & option_equity_ratiom_chg <= 1.03 & option_equity_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_option_ratio1m_chg >= 0.97 & rst_option_ratio1m_chg <= 1.03 & rst_option_ratio1m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_option_ratio2m_chg >= 0.97 & rst_option_ratio2m_chg <= 1.03 & rst_option_ratio2m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_psu_options_ratiom_chg >= 0.97 & rst_psu_options_ratiom_chg <= 1.03 & rst_psu_options_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_equity_ratiom_chg >= 0.97 & rst_equity_ratiom_chg <= 1.03 & rst_equity_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_options_ratio1m_chg >= 0.97 & psu_options_ratio1m_chg <= 1.03 & psu_options_ratio1m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_options_ratio2m_chg >= 0.97 & psu_options_ratio2m_chg <= 1.03 & psu_options_ratio2m_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_rst_options_ratiom_chg >= 0.97 & psu_rst_options_ratiom_chg <= 1.03 & psu_rst_options_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_equity_ratiom_chg >= 0.97 & psu_equity_ratiom_chg <= 1.03 & psu_equity_ratiom_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (option_psu_rst_ratiom_r_chg >= 0.97 & option_psu_rst_ratiom_r_chg <= 1.03 & option_psu_rst_ratiom_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (rst_psu_options_ratiom_r_chg >= 0.97 & rst_psu_options_ratiom_r_chg <= 1.03 & rst_psu_options_ratiom_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = 1 if (psu_rst_options_ratiom_r_chg >= 0.97 & psu_rst_options_ratiom_r_chg <= 1.03 & psu_rst_options_ratiom_r_chg != . & stk_prc_chg_in3percent != 1)
replace EquityInside_UnchgProportion = . if equity_pay == .


* Generate the dummy for Fix Pay Ratio
gen FixPayRatio = 0
replace FixPayRatio = 1 if EquityTDC1_UnchgProportion == 1
replace FixPayRatio = 1 if EquityInside_UnchgProportion == 1
replace FixPayRatio = . if EquityTDC1_UnchgProportion == . & EquityInside_UnchgProportion == .






* Any Type of Preset-Structure Plans
gen Preset_Structure = 0
replace Preset_Structure = 1 if EquityTDC1_RglProportion == 1
replace Preset_Structure = 1 if EquityInside_RglProportion == 1
replace Preset_Structure = 1 if FixPayRatio == 1
replace Preset_Structure = . if EquityTDC1_RglProportion == . & EquityInside_RglProportion == . & FixPayRatio == .







 









	
	
	
	
	




/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/******************************************************Generation of Pay-Tracking********************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/




* Type 1: Total Pay Tracking
* tdc1_yis50_sale150 is the median CEO total pay of the companies from the same two-digit SIC industry as the focal firm with comparable sales (that is, a sales level within the range of 50% to 150%)
* tdc1_peer50 is the median percentile of the disclosed peers' CEO total pay as the benchmark pay
* benchmark_min_ptdc1 is the minimum percentile of the disclosed peers' CEO total pay as the benchmark pay
* benchmark_max_ptdc1 is the maximum percentile of the disclosed peers' CEO total pay as the benchmark pay

gen tdc1_peer_exact = tdc1_peer50
replace tdc1_peer_exact = benchmark_min_ptdc1 if benchmark_min_ptdc1 ~= . & benchmark_max_ptdc1 == .
replace tdc1_peer_exact = benchmark_max_ptdc1 if benchmark_min_ptdc1 == . & benchmark_max_ptdc1 ~= .
replace tdc1_peer_exact = (benchmark_min_ptdc1 + benchmark_max_ptdc1) / 2 if benchmark_min_ptdc1 ~= . & benchmark_max_ptdc1 ~= .

gen tdc1_ratio = tdc1 / tdc1_yis50_sale150
replace tdc1_ratio = tdc1 / tdc1_peer_exact if tdc1 / tdc1_peer_exact ~= .

gen TDC1_Tracking_25P = 0
replace TDC1_Tracking_25P = 1 if tdc1_ratio >= 0.75 & tdc1_ratio <= 1.25
replace TDC1_Tracking_25P = . if tdc1_ratio == .




* Type 2: Equity Pay Tracking
* equity_yis50_sale150, options_yis50_sale150, stock_yis50_sale150 are the median CEO equity/options/stock pay of the companies from the same two-digit SIC industry as the focal firm with comparable sales (that is, a sales level within the range of 50% to 150%)
* equity_pay_peer50, option_fv_peer50, stock_fv_peer50 are the median percentile of the disclosed peers' CEO equity/options/stock pay as the benchmark pay
* benchmark_min_pequity, benchmark_min_poptions, benchmark_min_pstock are the minimum percentile of the disclosed peers' CEO equity/options/stock pay as the benchmark pay
* benchmark_max_pequity, benchmark_max_poptions, benchmark_max_pstock are the maximum percentile of the disclosed peers' CEO equity/options/stock pay as the benchmark pay
gen equity_peer_exact = equity_pay_peer50
replace equity_peer_exact = benchmark_min_pequity if benchmark_min_pequity ~= . & benchmark_max_pequity == .
replace equity_peer_exact = benchmark_max_pequity if benchmark_min_pequity == . & benchmark_max_pequity ~= .
replace equity_peer_exact = (benchmark_min_pequity + benchmark_max_pequity) / 2 if benchmark_min_pequity ~= . & benchmark_max_pequity ~= .

gen options_peer_exact = option_fv_peer50
replace options_peer_exact = benchmark_min_poptions if benchmark_min_poptions ~= . & benchmark_max_poptions == .
replace options_peer_exact = benchmark_max_poptions if benchmark_min_poptions == . & benchmark_max_poptions ~= .
replace options_peer_exact = (benchmark_min_poptions + benchmark_max_poptions) / 2 if benchmark_min_poptions ~= . & benchmark_max_poptions ~= .

gen stock_peer_exact = stock_fv_peer50
replace stock_peer_exact = benchmark_min_pstock if benchmark_min_pstock ~= . & benchmark_max_pstock == .
replace stock_peer_exact = benchmark_max_pstock if benchmark_min_pstock == . & benchmark_max_pstock ~= .
replace stock_peer_exact = (benchmark_min_pstock + benchmark_max_pstock) / 2 if benchmark_min_pstock ~= . & benchmark_max_pstock ~= .



gen equity_ratio = equity_pay / equity_yis50_sale150
replace equity_ratio = equity_pay / equity_peer_exact if equity_pay / equity_peer_exact ~= .

gen options_ratio = option_fv / options_yis50_sale150
replace options_ratio = option_fv / options_peer_exact if option_fv / options_peer_exact ~= .

gen stock_ratio = stock_fv / stock_yis50_sale150
replace stock_ratio = stock_fv / stock_peer_exact if stock_fv / stock_peer_exact ~= .



gen EquityPay_Tracking_25P = 0
replace EquityPay_Tracking_25P = 1 if equity_ratio >= 0.75 & equity_ratio <= 1.25
replace EquityPay_Tracking_25P = . if equity_ratio == .

gen Options_Tracking_25P = 0
replace Options_Tracking_25P = 1 if options_ratio >= 0.75 & options_ratio <= 1.25
replace Options_Tracking_25P = . if options_ratio == .

gen Stock_Tracking_25P = 0
replace Stock_Tracking_25P = 1 if stock_ratio >= 0.75 & stock_ratio <= 1.25
replace Stock_Tracking_25P = . if stock_ratio == .

gen Equity_Tracking_25P = 0
replace Equity_Tracking_25P = 1 if EquityPay_Tracking_25P == 1 | Options_Tracking_25P == 1 | Stock_Tracking_25P == 1
replace Equity_Tracking_25P = . if EquityPay_Tracking_25P == . & Options_Tracking_25P == . & Stock_Tracking_25P == .









* Type 3: Fixed Tracking

gen TDC1_Tracking_Fixed = .
replace TDC1_Tracking_Fixed = 0 if l.tdc1_ratio ~= . & tdc1_ratio ~= .
replace TDC1_Tracking_Fixed = 1 if tdc1_ratio / l.tdc1_ratio >= 0.97 & tdc1_ratio / l.tdc1_ratio <= 1.03 & tdc1_ratio ~= . & tdc1_ratio ~= 0 & l.tdc1_ratio ~= . & l.tdc1_ratio ~= 0 & stk_prc_chg_in3percent ~= 1

gen EquityPay_Tracking_Fixed = .
replace EquityPay_Tracking_Fixed = 0 if l.equity_ratio ~= . & equity_ratio ~= .
replace EquityPay_Tracking_Fixed = 1 if equity_ratio / l.equity_ratio >= 0.97 & equity_ratio / l.equity_ratio <= 1.03 & equity_ratio ~= . & equity_ratio ~= 0 & l.equity_ratio ~= . & l.equity_ratio ~= 0 & stk_prc_chg_in3percent ~= 1

gen Options_Tracking_Fixed = .
replace Options_Tracking_Fixed = 0 if l.options_ratio ~= . & options_ratio ~= .
replace Options_Tracking_Fixed = 1 if options_ratio / l.options_ratio >= 0.97 & options_ratio / l.options_ratio <= 1.03 & options_ratio ~= . & options_ratio ~= 0 & l.options_ratio ~= . & l.options_ratio ~= 0 & stk_prc_chg_in3percent ~= 1

gen Stocks_Tracking_Fixed = .
replace Stocks_Tracking_Fixed = 0 if l.stock_ratio ~= . & stock_ratio ~= .
replace Stocks_Tracking_Fixed = 1 if stock_ratio / l.stock_ratio >= 0.97 & stock_ratio / l.stock_ratio <= 1.03 & stock_ratio ~= . & stock_ratio ~= 0 & l.stock_ratio ~= . & l.stock_ratio ~= 0 & stk_prc_chg_in3percent ~= 1


gen Fixed_Tracking = 0
replace Fixed_Tracking = 1 if TDC1_Tracking_Fixed == 1 | EquityPay_Tracking_Fixed == 1 | Options_Tracking_Fixed == 1 | Stocks_Tracking_Fixed == 1
replace Fixed_Tracking = . if TDC1_Tracking_Fixed == . & EquityPay_Tracking_Fixed == . & Options_Tracking_Fixed == . & Stocks_Tracking_Fixed == .



* Any Type of Pay-Tracking Plans

gen Pay_Tracking = 0
replace Pay_Tracking = 1 if TDC1_Tracking_25P == 1 | Equity_Tracking_25P == 1 | Fixed_Tracking == 1 
replace Pay_Tracking = . if TDC1_Tracking_25P == . & Equity_Tracking_25P == . & Fixed_Tracking == .




 

 
 
 
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/***************************************** Generation of Value-Based Practice****************************************************/
/********************************************************************************************************************************/
/********************************************************************************************************************************/

gen Value_Based = 0
replace Value_Based = 1 if Fixed_Value == 1 | Preset_Structure == 1 | Pay_Tracking == 1 
replace Value_Based = . if Fixed_Value == . & Preset_Structure == . & Pay_Tracking == .








































/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/**************************************************  Figures and Tables in Main Text ****************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/









/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/********************************************  Figure 1 Percentage of Firms Using Fixed-Value Plans *************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/

replace options_fv_fixed = 0 if options_fv_fixed == . & Fixed_Value ~= .
replace stock_fv_fixed = 0 if stock_fv_fixed == . & Fixed_Value ~= .
replace equity_fixed = 0 if equity_fixed == . & Fixed_Value ~= .

logout, save(Figure1_1) word replace: tabstat options_fv_fixed, by(year) stats(mean)
logout, save(Figure1_2) word replace: tabstat stock_fv_fixed, by(year) stats(mean)
logout, save(Figure1_3) word replace: tabstat equity_fixed, by(year) stats(mean)
logout, save(Figure1_4) word replace: tabstat Fixed_Value, by(year) stats(mean)




/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************   Figure 2 Percentage of Firms That Preset the Structure of CEO Compensation  *****************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/

replace EquityTDC1_RglProportion = 0 if EquityTDC1_RglProportion == . & Preset_Structure ~= .
replace EquityInside_RglProportion = 0 if EquityInside_RglProportion == . & Preset_Structure ~= .
replace FixPayRatio = 0 if FixPayRatio == . & Preset_Structure ~= .

logout, save(Figure2_1) word replace: tabstat EquityTDC1_RglProportion, by(year) stats(mean)
logout, save(Figure2_2) word replace: tabstat EquityInside_RglProportion, by(year) stats(mean)
logout, save(Figure2_3) word replace: tabstat FixPayRatio, by(year) stats(mean)
logout, save(Figure2_4) word replace: tabstat Preset_Structure, by(year) stats(mean)




/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/********************************** Figure 3 Percentage of Firms That Practice Strict Pay Tracking **************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/

replace TDC1_Tracking_25P = 0 if TDC1_Tracking_25P == . & Pay_Tracking ~= .
replace Equity_Tracking_25P = 0 if Equity_Tracking_25P == . & Pay_Tracking ~= .
replace Fixed_Tracking = 0 if Fixed_Tracking == . & Pay_Tracking ~= .

logout, save(Figure3_1) word replace: tabstat TDC1_Tracking_25P, by(year) stats(mean)
logout, save(Figure3_2) word replace: tabstat Equity_Tracking_25P, by(year) stats(mean)
logout, save(Figure3_3) word replace: tabstat Fixed_Tracking, by(year) stats(mean)
logout, save(Figure3_4) word replace: tabstat Pay_Tracking, by(year) stats(mean)










 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

















/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/***************************** Table 1  Summary Statistics of Main Variables Used in This Study *****************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/

logout, save(Table1) word replace: tabstat Fixed_Value Preset_Structure Pay_Tracking Value_Based Ln_Option_Num Ln_Stocks_Num Ln_Delta RD_Chg LnMV TobinQ Ret_Voliatility Ret_bf_OptionGrant Ret_bf_StockGrant Ln_CumulativeRet Firm_Age CEO_Age CEO_Tenure CEO_First_Year Inside_CEO LnTDC1 Equity_Pay_Ratio Citation Ln_NetworkSize CID_No Size_Percentile Founder Marketable_Age Buniness_Uniqueness Retention_Pressure_Score Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership Govenance_Quality_Score, stats(n mean sd median)








/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************** Table 2  Number of Firms Making Value-Based CEO Equity Grants *******************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
logout, save(Table2_1) word replace: tabstat Sample if Value_Based ~= . , by(year) stats(n)
logout, save(Table2_2) word replace: tabstat Sample if Fixed_Value == 1, by(year) stats(n)
logout, save(Table2_3) word replace: tabstat Sample if Preset_Structure == 1, by(year) stats(n)
logout, save(Table2_4) word replace: tabstat Sample if Pay_Tracking == 1, by(year) stats(n)
logout, save(Table2_5) word replace: tabstat Sample if Value_Based == 1, by(year) stats(n)
logout, save(Table2_6) word replace: tabstat Sample if Value_Based == 0, by(year) stats(n)





 


/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/**************************** Table 3  Value-Based Equity Grants and Ex Post Pay-Performance Sensitivity ********************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
gen LnMV_Value_Based = LnMV * Value_Based
gen LnMV_Fixed_Value = LnMV * Fixed_Value
gen LnMV_Preset_Structure = LnMV * Preset_Structure
gen LnMV_Pay_Tracking = LnMV * Pay_Tracking


global y "LnEquity"
global x "LnMV_Value_Based LnMV Value_Based TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Value_Based==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table3.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(LnEquity) keep($x) addtext(Year FE, Yes, Firm FE, Yes)
global x "LnMV_Fixed_Value LnMV Fixed_Value TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Fixed_Value==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table3.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(LnEquity) keep($x) addtext(Year FE, Yes, Firm FE, Yes)
global x "LnMV_Preset_Structure LnMV Preset_Structure TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Preset_Structure==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table3.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(LnEquity) keep($x) addtext(Year FE, Yes, Firm FE, Yes)
global x "LnMV_Pay_Tracking LnMV Pay_Tracking TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Pay_Tracking==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table3.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(LnEquity) keep($x) addtext(Year FE, Yes, Firm FE, Yes)











/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/************************************** Table 4  Value-Based CEO Equity Grants and No. of Shares Granted ********************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/



/************************************************************** Panel A. Option Grants  **************************************************/

gen Ret_bf_Option_Value_Based = Ret_bf_OptionGrant * Value_Based
gen Ret_bf_Option_Fixed_Value = Ret_bf_OptionGrant * options_fv_fixed
gen Ret_bf_Option_Preset_Structure = Ret_bf_OptionGrant * Preset_Structure
gen Ret_bf_Option_Pay_Tracking = Ret_bf_OptionGrant * Pay_Tracking



global y "Ln_Option_Num"
global x "Ret_bf_Option_Value_Based Ret_bf_OptionGrant Value_Based LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Value_Based==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_A.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Option_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)

global x "Ret_bf_Option_Fixed_Value Ret_bf_OptionGrant options_fv_fixed LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if options_fv_fixed==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_A.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Option_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)

global x "Ret_bf_Option_Preset_Structure Ret_bf_OptionGrant Preset_Structure LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Preset_Structure==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_A.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Option_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)

global x "Ret_bf_Option_Pay_Tracking Ret_bf_OptionGrant Pay_Tracking LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Pay_Tracking==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_A.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Option_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)









/************************************************************** Panel B. Stock Grants  **************************************************/

gen Ret_bf_Stock_Value_Based = Ret_bf_StockGrant * Value_Based
gen Ret_bf_Stock_Fixed_Value = Ret_bf_StockGrant * stock_fv_fixed
gen Ret_bf_Stock_Preset_Structure = Ret_bf_StockGrant * Preset_Structure
gen Ret_bf_Stock_Pay_Tracking = Ret_bf_StockGrant * Pay_Tracking



global y "Ln_Stocks_Num"
global x "Ret_bf_StockGrant Ret_bf_Stock_Value_Based Value_Based LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Value_Based==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_B.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Stocks_Num) keep($x) addtext(Year FE, Yes,Firm FE, Yes)

global x "Ret_bf_StockGrant Ret_bf_Stock_Fixed_Value stock_fv_fixed LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if stock_fv_fixed==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Stocks_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)

global x "Ret_bf_StockGrant Ret_bf_Stock_Preset_Structure Preset_Structure LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Preset_Structure==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Stocks_Num) keep($x) addtext(Year FE, Yes,Firm FE, Yes)

global x "Ret_bf_StockGrant Ret_bf_Stock_Pay_Tracking Pay_Tracking LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reghdfe $y $x if Pay_Tracking==1 | Value_Based==0, absorb(year firm_id) vce (cluster firm_id)
outreg2 using Table4_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Stocks_Num) keep($x) addtext(Year FE, Yes, Firm FE, Yes)














/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/********************************************* Table 5  Value-Based Equity Grants and CEO Portfolio Delta ********************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
xtset firm_id year

gen Value_Based_2y = 0
replace Value_Based_2y = 1 if Value_Based == 1 & L.Value_Based == 1
gen Value_Based_3y = 0
replace Value_Based_3y = 1 if Value_Based == 1 & L.Value_Based == 1 & L2.Value_Based == 1
gen Value_Based_4y = 0
replace Value_Based_4y = 1 if Value_Based == 1 & L.Value_Based == 1 & L2.Value_Based == 1 & L3.Value_Based == 1

gen Value_Based_2y_Ln_CumulativeRet = Value_Based_2y * Ln_CumulativeRet
gen Value_Based_3y_Ln_CumulativeRet = Value_Based_3y * Ln_CumulativeRet
gen Value_Based_4y_Ln_CumulativeRet = Value_Based_4y * Ln_CumulativeRet


global y "Ln_Delta"
global x "Value_Based_2y_Ln_CumulativeRet Value_Based_2y Ln_CumulativeRet CEO_Tenure LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Value_Based_2y==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table5.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Delta) keep($x) addtext(Year FE, Yes, Ind FE, Yes)
global x "Value_Based_3y_Ln_CumulativeRet Value_Based_3y Ln_CumulativeRet CEO_Tenure LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if  Value_Based_3y==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table5.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Delta) keep($x) addtext(Year FE, Yes, Ind FE, Yes)
global x "Value_Based_4y_Ln_CumulativeRet Value_Based_4y Ln_CumulativeRet CEO_Tenure LnMV TobinQ Ret_Voliatility Board_Indp_Ratio Board_Busy_Ratio Board_Coopted_Ratio CEO_Chair Inst_Block_Ownership CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if  Value_Based_4y==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table5.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_Delta) keep($x) addtext(Year FE, Yes, Ind FE, Yes)





/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/**************************************** Table 6  Exploring the Real Consequence of Value-Based Equity Grants **************************/
/**************************************************   – Evidence Based on Fixed-Value Plans   *******************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/


* Generate IV : Extrapolated_Fixed_Value
xtset firm_id year


gen Last_Cycle_Option = 1
replace Last_Cycle_Option = 3 if l.option_fv_ratio >= 0.97 & l.option_fv_ratio <= 1.03 & l2.option_fv_ratio >= 0.97 & l2.option_fv_ratio <= 1.03 & l.option_fv_ratio ~= . & l2.option_fv_ratio ~= .
replace Last_Cycle_Option = 2 if l.option_fv_ratio >= 0.97 & l.option_fv_ratio <= 1.03 & l2.option_fv_ratio < 0.97 & l.option_fv_ratio ~= . & l2.option_fv_ratio ~= .
replace Last_Cycle_Option = 2 if l.option_fv_ratio >= 0.97 & l.option_fv_ratio <= 1.03 & l2.option_fv_ratio > 1.03 & l.option_fv_ratio ~= . & l2.option_fv_ratio ~= .

gen Extrapolated_Fixed_Option = 0
replace Extrapolated_Fixed_Option = 1 if Last_Cycle_Option == 3
replace Extrapolated_Fixed_Option = 1 if l.Last_Cycle_Option == 3
replace Extrapolated_Fixed_Option = 1 if l2.Last_Cycle_Option == 3
replace Extrapolated_Fixed_Option = 1 if Last_Cycle_Option == 2
replace Extrapolated_Fixed_Option = 1 if l.Last_Cycle_Option == 2


gen Last_Cycle_Stock = 1
replace Last_Cycle_Stock = 3 if l.stock_fv_ratio >= 0.97 & l.stock_fv_ratio <= 1.03 & l2.stock_fv_ratio >= 0.97 & l2.stock_fv_ratio <= 1.03 & l.stock_fv_ratio ~= . & l2.stock_fv_ratio ~= .
replace Last_Cycle_Stock = 2 if l.stock_fv_ratio >= 0.97 & l.stock_fv_ratio <= 1.03 & l2.stock_fv_ratio < 0.97 & l.stock_fv_ratio ~= . & l2.stock_fv_ratio ~= .
replace Last_Cycle_Stock = 2 if l.stock_fv_ratio >= 0.97 & l.stock_fv_ratio <= 1.03 & l2.stock_fv_ratio > 1.03 & l.stock_fv_ratio ~= . & l2.stock_fv_ratio ~= .

gen Extrapolated_Fixed_Stock = 0
replace Extrapolated_Fixed_Stock = 1 if Last_Cycle_Stock == 3
replace Extrapolated_Fixed_Stock = 1 if l.Last_Cycle_Stock == 3
replace Extrapolated_Fixed_Stock = 1 if l2.Last_Cycle_Stock == 3
replace Extrapolated_Fixed_Stock = 1 if Last_Cycle_Stock == 2
replace Extrapolated_Fixed_Stock = 1 if l.Last_Cycle_Stock == 2


gen Last_Cycle_Equity = 1
replace Last_Cycle_Equity = 3 if l.equity_pay_ratio >= 0.97 & l.equity_pay_ratio <= 1.03 & l2.equity_pay_ratio >= 0.97 & l2.equity_pay_ratio <= 1.03 & l.equity_pay_ratio ~= . & l2.equity_pay_ratio ~= .
replace Last_Cycle_Equity = 2 if l.equity_pay_ratio >= 0.97 & l.equity_pay_ratio <= 1.03 & l2.equity_pay_ratio < 0.97 & l.equity_pay_ratio ~= . & l2.equity_pay_ratio ~= .
replace Last_Cycle_Equity = 2 if l.equity_pay_ratio >= 0.97 & l.equity_pay_ratio <= 1.03 & l2.equity_pay_ratio > 1.03 & l.equity_pay_ratio ~= . & l2.equity_pay_ratio ~= .

gen Extrapolated_Fixed_Equity = 0
replace Extrapolated_Fixed_Equity = 1 if Last_Cycle_Equity == 3
replace Extrapolated_Fixed_Equity = 1 if l.Last_Cycle_Equity == 3
replace Extrapolated_Fixed_Equity = 1 if l2.Last_Cycle_Equity == 3
replace Extrapolated_Fixed_Equity = 1 if Last_Cycle_Equity == 2
replace Extrapolated_Fixed_Equity = 1 if l.Last_Cycle_Equity == 2


gen Extrapolated_Fixed_Value = 0
replace Extrapolated_Fixed_Value = 1 if Extrapolated_Fixed_Option == 1 | Extrapolated_Fixed_Stock == 1 | Extrapolated_Fixed_Equity == 1





									
									
								

global y "RD_Chg"
global x "Fixed_Value LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:reg $y $x i.sic_2 i.year if Value_Based==0 | Fixed_Value==1,robust cluster(firm_id)
outreg2 using Table6.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(RD_Chg) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Fixed_Value"
global x "Extrapolated_Fixed_Value LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:reg $y $x i.sic_2 i.year if (Value_Based==0 | Fixed_Value==1) & RD_Chg~=.,robust cluster(firm_id)
outreg2 using Table6.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Fixed_Value) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "RD_Chg"
global x "LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:ivreg2 $y $x i.sic_2 i.year (Fixed_Value=Extrapolated_Fixed_Value) if Value_Based==0 | Fixed_Value==1, robust cluster(firm_id)
outreg2 using Table6.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(RD_Chg) keep(Fixed_Value $x) addtext(Year FE, Yes, Ind FE, Yes)
















/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/*******************************   Table 7 Exploring the Real Consequences of Value-Based Equity Grants  ********************************/
/************************************************  - Evidence Based on Preset Pay Structure Plans  **************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/




global y "RD_Chg"
global x "Preset_Structure LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:reg $y $x i.sic_2 i.year if year>2011 & (Preset_Structure==1 | Value_Based==0),robust cluster(firm_id)
outreg2 using Table7.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(RD_Chg) keep($x) addtext(Ind FE, Yes, Year FE, Yes)


global y "Preset_Structure"
global x "OneYear_SOP LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:reg $y $x i.sic_2 i.year if year>2011 & (Preset_Structure==1 | Value_Based==0) & RD_Chg~=.,robust cluster(firm_id)
outreg2 using Table7.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Preset_Structure) keep($x) addtext(Ind FE, Yes, Year FE, Yes)


global y "RD_Chg"
global x "LnTDC1 Equity_Pay_Ratio LnMV TobinQ Ret_Voliatility Firm_Age CEO_Age CEO_First_Year Inside_CEO RD_Missing"
xi:ivreg2 $y $x i.sic_2 i.year (Preset_Structure=OneYear_SOP) if year>2011 & (Preset_Structure==1 | Value_Based==0), robust cluster(firm_id)
outreg2 using Table7.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(RD_Chg) keep(Preset_Structure $x) addtext(Year FE, Yes, Ind FE, Yes)






















/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/*************************   Table 8  Why Do Firms Pay Equity Based on Value? The Role of Retention Pressure  ***************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/



global x "Retention_Pressure_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"

global y "Value_Based"
xi:logit $y $x i.sic_2 i.year if Value_Based==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table8.xls,replace tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Value_Based) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Fixed_Value"
xi:logit $y $x i.sic_2 i.year if Fixed_Value==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table8.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Fixed_Value) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Preset_Structure"
xi:logit $y $x i.sic_2 i.year if Preset_Structure==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table8.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Preset_Structure) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Pay_Tracking"
xi:logit $y $x i.sic_2 i.year if Pay_Tracking==1 | Value_Based==0 ,robust cluster(firm_id)
outreg2 using Table8.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Pay_Tracking) keep($x) addtext(Ind FE, Yes, Year FE, Yes)




















/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/***************************   Table 9  Retention Pressure and Value-Based Equity Grants – Two-Stage IV Analysis  ***********************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/





/***************************************************   Panel A.  Headquarters Changes  ***************************************************/

logout, save(Table9_A) word replace:tabstat Headquarters_Change Move_To_More_Firms Move_To_Fewer_Firms,stats(n mean sd min p25 median p75 max)




/*************************************   Panel B.  First-Stage Analysis: Finding the Right Instrumental Variable  *************************/

global y "Retention_Pressure_Score"
global x "Headquarters_Change LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=.,robust cluster(firm_id)
outreg2 using Table9_B.xls,replace tstat bdec(4) tdec(2) adjr2 ctitle(Retention_Pressure_Score) keep($x) addtext(Year FE, Yes, Ind FE, Yes)

global x "Move_To_More_Firms Move_To_Fewer_Firms LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=.,robust cluster(firm_id)
outreg2 using Table9_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Retention_Pressure_Score) keep($x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Citation"
global x "Move_To_More_Firms LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=.,robust cluster(firm_id)
outreg2 using Table9_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Citation) keep($x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Ln_NetworkSize"
global x "Move_To_More_Firms LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=. ,robust cluster(firm_id)
outreg2 using Table9_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Ln_NetworkSize) keep($x) addtext(Year FE, Yes, Ind FE, Yes)

global y "CID_No"
global x "Move_To_More_Firms LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=.,robust cluster(firm_id)
outreg2 using Table9_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(CID_No) keep($x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Size_Percentile"
global x "Move_To_More_Firms LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:reg $y $x i.sic_2 i.year if Retention_Pressure_Score~=. & Value_Based~=.,robust cluster(firm_id)
outreg2 using Table9_B.xls,append tstat bdec(4) tdec(2) adjr2 ctitle(Size_Percentile) keep($x) addtext(Year FE, Yes, Ind FE, Yes)
















/*************************************************   Panel C. Second-Stage IV-Probit Result  **********************************************/


global y "Value_Based"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if Value_Based==1 | Value_Based==0
outreg2 using Table9_C.xls,replace tstat bdec(4) tdec(2) ctitle(Value_Based) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Fixed_Value"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if Fixed_Value==1 | Value_Based==0
outreg2 using Table9_C.xls,append tstat bdec(4) tdec(2) ctitle(Fixed_Value) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Preset_Structure"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if Preset_Structure==1 | Value_Based==0
outreg2 using Table9_C.xls,append tstat bdec(4) tdec(2) ctitle(Preset_Structure) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Pay_Tracking"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if Pay_Tracking==1 | Value_Based==0
outreg2 using Table9_C.xls,append tstat bdec(4) tdec(2) ctitle(Pay_Tracking) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)








/*************************************************   Panel D. Years [-3, +3] Matched Sample Results  **************************************/
* Insufficient qualified observations for results display in pseudo data
* Sufficient qualified observations for results display in the total sample
* However, please note that even in the total sample, qualified observations are still rare (see results in Panel D of Table 9 in the main text)

global y "Value_Based"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if (Value_Based==1 | Value_Based==0) & Move_To_More_MatchedSample==1
outreg2 using Table9_D.xls,replace tstat bdec(4) tdec(2) ctitle(Value_Based) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Fixed_Value"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if (Fixed_Value==1 | Value_Based==0) & Move_To_More_MatchedSample==1
outreg2 using Table9_D.xls,append tstat bdec(4) tdec(2) ctitle(Fixed_Value) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Preset_Structure"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if (Preset_Structure==1 | Value_Based==0) & Move_To_More_MatchedSample==1
outreg2 using Table9_D.xls,append tstat bdec(4) tdec(2) ctitle(Preset_Structure) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)

global y "Pay_Tracking"
global x "LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"
xi:ivprobit $y $x i.sic_2 i.year (Retention_Pressure_Score=Move_To_More_Firms) if (Pay_Tracking==1 | Value_Based==0) & Move_To_More_MatchedSample==1
outreg2 using Table9_D.xls,append tstat bdec(4) tdec(2) ctitle(Pay_Tracking) keep(Retention_Pressure_Score $x) addtext(Year FE, Yes, Ind FE, Yes)























/****************************************************************************************************************************************/
/****************************************************************************************************************************************/
/**************************   Table 10  Corporate Governance Quality and the Use of Value-Based Equity Grants    ************************/
/****************************************************************************************************************************************/
/****************************************************************************************************************************************/



/*************************************************************   Panel A. Logistic Regression  ******************************************/

global x "Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO"

global y "Value_Based"
xi:logit $y $x i.sic_2 i.year if Value_Based==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table10_A.xls,replace tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Value_Based) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Fixed_Value"
xi:logit $y $x i.sic_2 i.year if Fixed_Value==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table10_A.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Fixed_Value) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Preset_Structure"
xi:logit $y $x i.sic_2 i.year if Preset_Structure==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table10_A.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Preset_Structure) keep($x) addtext(Ind FE, Yes, Year FE, Yes)

global y "Pay_Tracking"
xi:logit $y $x i.sic_2 i.year if Pay_Tracking==1 | Value_Based==0,robust cluster(firm_id)
outreg2 using Table10_A.xls,append tstat bdec(4) tdec(2) addstat(Pseudo R-squared, `e(r2_p)') ctitle(Pay_Tracking) keep($x) addtext(Ind FE, Yes, Year FE, Yes)
















/*************************************************************   Panel B. GMM Regression  ***********************************************/



tsset firm_id year


xi: xtabond2 Value_Based l.Value_Based l2.Value_Based l3.Value_Based l4.Value_Based Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO i.year if Value_Based==1 | Value_Based==0, gmm(Value_Based Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO, lag(5 6) collapse) iv(i.year Firm_Age) twostep robust
outreg2 using Table10_B.xls,replace r2 tstat bdec(4) tdec(2) ctitle(Value_Based) 

xi: xtabond2 Fixed_Value l.Fixed_Value l2.Fixed_Value l3.Fixed_Value l4.Fixed_Value Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO i.year if Fixed_Value==1 | Value_Based==0, gmm(Fixed_Value Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO, lag(5 6) collapse) iv(i.year Firm_Age) twostep robust
outreg2 using Table10_B.xls,append r2 tstat bdec(4) tdec(2) ctitle(Fixed_Value)  

xi: xtabond2 Preset_Structure l.Preset_Structure l2.Preset_Structure l3.Preset_Structure l4.Preset_Structure Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO i.year if Preset_Structure==1 | Value_Based==0, gmm(Preset_Structure Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO, lag(5 6) collapse) iv(i.year Firm_Age) twostep robust
outreg2 using Table10_B.xls,append r2 tstat bdec(4) tdec(2) ctitle(Preset_Structure)  

xi: xtabond2 Pay_Tracking l.Pay_Tracking l2.Pay_Tracking l3.Pay_Tracking l4.Pay_Tracking Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO i.year if Pay_Tracking==1 | Value_Based==0, gmm(Pay_Tracking Govenance_Quality_Score LnMV TobinQ Ret_Voliatility CEO_First_Year Inside_CEO, lag(5 6) collapse) iv(i.year Firm_Age) twostep robust
outreg2 using Table10_B.xls,append r2 tstat bdec(4) tdec(2) ctitle(Pay_Tracking) 














